#include <stdio.h>
#include <math.h>
int main()
{
    int i, j, a[4], n;
    for (i = 0; i < 3; i++)
    {
        for (j = 0; j < 4; j++)
            if (j == i)
                a[j] = 1;
            else
                a[j] = 0;
        if (a[3] + a[1] == 1 && a[1] + a[2] == 1 && a[0] + a[1] == 1)
        {
            printf(" the thief is");
            for (j = 0; j <= 3; j++)
                if (a[j])
                    printf("%c", j + 'A');
            printf("\n");
        }
    }
}